<?php
require_once 'shuju.php';
header("content-type:/html;charset=utf-8");
$id = $_POST['id'];
$id = intval($id);

$usename = $_POST['username'];
$sex = $_POST['sex'];
$message = $_POST['message'];
$imgurl = $_POST['imgurl']; 
$time_ai = time();

$sql = "
UPDATE  `hzk`.`t_message`
SET
`usename` = '$usename' ,
`sex` =  '$sex',
`content = '$message'` ,
`avater` ='$imgurl'  ,
`time_ai` = '$time_ai'
WHERE  `t_message`.`id` =$id ;
";
//echo $sql;
//die;
$result = $conn->query($sql);
print_r($result);